/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;

/**
 *
 * @author KohLi
 */
@Entity(name="MessageAction")
public class MessageActionEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private boolean deleteFromMailbox;
    private boolean deleteFromDataBase;
    private boolean see; 
    private boolean keep;
    private boolean reply;
    
    
    //@OneToOne
    //private MessageEntity message;
    
    public MessageActionEntity(){
        
    }
    
    public MessageActionEntity(boolean delFromMail, boolean delFromDB, boolean see, boolean keep, boolean reply){ //MessageEntity message){
        this.see = see;
        this.deleteFromDataBase = delFromDB;
        this.deleteFromMailbox = delFromMail;
        this.keep = keep;
        this.reply = reply;
        //this.message = message;
                   
    }
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MessageActionEntity)) {
            return false;
        }
        MessageActionEntity other = (MessageActionEntity) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.MessageActionEntity[ id=" + id + " ]";
    }

    /**
     * @return the deleteFromMailbox
     */
    public boolean isDeleteFromMailbox() {
        return deleteFromMailbox;
    }

    /**
     * @param deleteFromMailbox the deleteFromMailbox to set
     */
    public void setDeleteFromMailbox(boolean deleteFromMailbox) {
        this.deleteFromMailbox = deleteFromMailbox;
    }

    /**
     * @return the deleteFromDataBase
     */
    public boolean isDeleteFromDataBase() {
        return deleteFromDataBase;
    }

    /**
     * @param deleteFromDataBase the deleteFromDataBase to set
     */
    public void setDeleteFromDataBase(boolean deleteFromDataBase) {
        this.deleteFromDataBase = deleteFromDataBase;
    }

    
    /**
     * @return the see
     */
    public boolean isSee() {
        return see;
    }

    /**
     * @param see the see to set
     */
    public void setSee(boolean see) {
        this.see = see;
    }

    /**
     * @return the keep
     */
    public boolean isKeep() {
        return keep;
    }

    /**
     * @param keep the keep to set
     */
    public void setKeep(boolean keep) {
        this.keep = keep;
    }

    /**
     * @return the reply
     */
    public boolean isReply() {
        return reply;
    }

    /**
     * @param reply the reply to set
     */
    public void setReply(boolean reply) {
        this.reply = reply;
    }
    
}
